
    /**  
    * @Title: PortalApiViewAuthController.java
    * @Package com.efast.cafe.portal.controller.api
    * @Description: TODO(用一句话描述该文件做什么)
    * @author Administrator
    * @date 2019年3月25日
    * @version V1.0  
    */
    
package com.efast.cafe.portal.controller.api;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

import com.efast.cafe.framework.bean.ResultBean;
import com.efast.cafe.portal.bean.api.PortalApiViewAuthQueryBean;
import com.efast.cafe.portal.bean.api.PortalApiViewAuthSaveBean;
import com.efast.cafe.portal.service.api.IPortalApiViewAuthService;

@Controller
@RequestMapping("/frame_center/api")
public class PortalApiViewAuthController {

	@Autowired
	private IPortalApiViewAuthService portalApiViewAuthService;
	
	@RequestMapping(value = "/viewAuth/query",method=RequestMethod.POST)
	public @ResponseBody ResultBean queryFieldAuth(@RequestBody PortalApiViewAuthQueryBean queryBean){
		ResultBean res = new ResultBean(true);
		res.setObject(portalApiViewAuthService.queryAuth(queryBean));
		return res;
	}
	
	@RequestMapping(value = "/viewAuth/save",method=RequestMethod.POST)
	public @ResponseBody ResultBean saveFieldAuth(@RequestBody PortalApiViewAuthSaveBean saveBean){
		portalApiViewAuthService.saveAuths(saveBean);
		return new ResultBean(true);
	}
}
